Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.

Addition of updated automated tests to vms #315

Merged
merged 8 commits into from
Jun 5, 2016

Conversation

smarshy
Copy link
Contributor

@smarshy smarshy commented May 29, 2016

This PR is to add updated automated tests to the VMS repository.

Earlier, the automated tests were in a separate repository and vms just had the unit tests.
The first three commits in this PR add the previous tests to the vms repository, move unit tests to the 'tests' folder so as to avoid conflicts and add small modifications to the installation guide so that a user can run unit tests or a test file separately if they want. The version of Selenium has also been upgraded to the latest one.

The packages mentioned in requirements.txt file need to be installed as a prerequisite. Also, firefox and selenium version compatibility has to be checked.
Right now, pip install selenium==2.53.1 is run by default. For another selenium version, run the same command replacing 2.53.1 with the version compatible with the users firefox browser. My Firefox version is 44.0.2 which is compatible with 2.53.1.
For finding out FIrefox version - here

The tests added previously in the last year have been run against the vms codebase in August 2015. Since vms has changed in the last one year, 76 out of total 101 cases failed or showed up errors after running them against the latest code. The last 5 commits in this PR are to update these tests app wise to resolve the errors.

After merging this PR, there should not be any errors in unit or functional tests, although a few failed cases would still be reported. Tests across all apps have been updated and errors resolved as per latest changes in vms codebase. All the tests for each app, whether it is unit or functional would be placed in the same tests folder in the vms repository.

To run all tests, run the following command :
python manage.py test

@smarshy smarshy changed the title Updated tests Addition of updated automated tests to vms Jun 2, 2016
@tapaswenipathak
Copy link
Contributor

After merging this PR, there should not be any errors in unit or functional tests, although a few failed cases would still be reported.

We need to document the failed test cases as well. How many are failing?

@smarshy
Copy link
Contributor Author

smarshy commented Jun 3, 2016

@tapasweni-pathak

There are 8 Failures. These are due to issue #327 :

  • test_report_with_empty_fields
  • test_job_field
  • test_intersection_of_fields
  • test_event_field
  • test_date_field
  • test_admin_cannot_access_volunteer_urls
  • test_cancel_assigned_shift
  • test_null_values_with_dataset
  • test_check_intersection_of_fields

I forgot to mention, there would be one error - in test_volunteer_cannot_access_admin_urls
As I have modified the tests expecting that a no admin rights page is shown for this. Once issue #325 is fixed, this should automatically pass.

@tapaswenipathak
Copy link
Contributor

tapaswenipathak commented Jun 5, 2016

I tested it. Good. :)

For me it ran 150 tests in 1829.783s with FAILED (failures=8, errors=1).

@tapaswenipathak tapaswenipathak merged commit 4e9d0c6 into anitab-org:develop Jun 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants